'use strict';

module.exports = appInfo => {
  const config = exports = {};
  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1533018816337_9674';

  config.view = {
    defaultViewEngine: 'nunjucks',
    mapping: {
      '.tpl': 'nunjucks',
    }
  };
  // add your config here
  config.middleware = [];
  
  config.env = 'local';
  /* config.env = 'production';*/
  
  config.onerror= {
      // 线上页面发生异常时，重定向到这个页面上
      errorPageUrl: './app/view/404.html'
  };
  /*// 允许请求
  config.cors = {
    origin: '*',
    allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS',
  };

  config.security = {
    csrf: {
      enable: false,
    }
  };*/
  return config;
};


